home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 August / Macworld (1999-08).dmg / From Macworld Readers / FREE Scripts / FREE Guides / FREE Guide Macintosh / FREE Guide • Macintosh 3.1.sea / FREE Guide • Macintosh 3.1.rsrc / TEXT_166.txt < prev    next >
Text File  |  1998-12-04  |  33KB  |  849 lines

  1.  
  2.  
  3.  
  4.  
  5. USING RESEDIT
  6.  
  7.  
  8.  
  9. The ResEdit Application
  10. qqqqqqqqqqqqqqqqq
  11.  
  12.  
  13. ¬†              ResEdit can modify file resources using specialised editors, templates or a hex 
  14.                editor. It needs at least 1500 K of memory and must be treated with care
  15.                ‚Äî using an unsuitable editor on a resource can cause a crash!
  16.  
  17. ResEdit operates directly on resources, reversing alterations when you change your mind. If a crash occurs your original may be lost!
  18.  
  19.  ¬∞ Always use ResEdit on a copy of your original file!
  20.  
  21. ResEdit shows each resource type as an icon with a 4-character code, such as these:-
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49. Double-clicking an icon reveals a list of resources. If you open ICON you‚Äôll see:-
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76. You can then open an individual item to modify it. For example:-
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104. With some resources the list isn‚Äôt so exciting:-
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126. and you must use a template:-
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152. or the hex editor:-
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171. If you press Option whilst opening a resource you‚Äôll force the hex editor into action instead of any specialised editor or template. After using the hex editor the resource should be the same size as when you started ‚Äî just check it in Get Resource Info.
  172.  
  173. To highlight those resources you‚Äôve modified just select Changed in the Edit menu.
  174.  
  175. If you select Get Info for or Get File/Folder Info‚Ķ you‚Äôll see a window like this:-
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203. in which you can modify file attributes and other parameters.
  204.  
  205. Programmers can test an application in Pig mode by pressing ‚Ć-Shift-Option whilst choosing About ResEdit‚Ķ ‚Äî repeat the process to return to normal.
  206.  
  207.  
  208.  
  209. Editing and Printing
  210. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  211.  
  212. By pressing Option whilst cutting or copying you can append resources to the Clipboard. ResEdit‚Äôs Clipboard data is kept in a scrap file and can‚Äôt be pasted into other applications unless it‚Äôs text or graphics.
  213.  
  214. Print reproduces the entire window, even if it‚Äôs not all visible on the screen. 
  215.  
  216.  
  217.  
  218. Resource IDs
  219. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  220.  
  221. If you paste a resource into a file that has similar resources you may get a ‚ÄòReplace Resources with same ID ?‚Äô dialog. Select No to cancel the operation, Yes to replace the resources or Unique ID to add the new resources without modifying any existing ones.
  222.  
  223. You can also enter a names for a resource in the Resource Info window.
  224.  
  225.  
  226.  
  227.  
  228. Font Resources
  229. qqqqqqqqqqqq
  230.  
  231.  
  232. ¬†           Font resources can exist in applications or stand-alone documents but are more 
  233.                 commonly found in the following:-
  234.  
  235.  
  236.                 File                      File Type      Resource         Containing                      
  237.  
  238.                PostScript Font      LWFN            POST               PostScript Type 1 font
  239.  
  240.                Font Suitcase         FFIL             FOND               Font family descriptor
  241.                                                          FONT               Bitmap font at 72 dpi
  242.                                                          NFNT               New version bitmap font
  243.                                                          sfnt                Scalable font *
  244.  
  245.                *   TrueType or GX. Also PostScript Type 1 on GX-equipped Mac
  246.  
  247.  
  248. Of these, only FONDs, FONTs and NFNTs can be modified using ResEdit. 
  249.  
  250.  
  251.  
  252. POST
  253. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  254. ¬†              A PostScript outine font resource ‚Äî usually in Type 1 form. If a style resource is 
  255.                it‚Äôs produced by modifying the plain font. For boldface 30% is added to the width; 
  256.                for oblique characters are slanted right by 15¬∞. 
  257.  
  258.  
  259. FOND
  260. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  261. ¬†              A font family descriptor or directory that locates up to four FONT, NFNT or sfnt 
  262.                resources used for plain, bold, italic and bold italic styles.
  263.  
  264. Width adjustments for outline, shadow, condensed or extended styles are inside the FOND itself. Get Info shows the FOND name (the font family name as in any Font menu) and its family ID (equal to the number inside the resource).
  265.  
  266. Special fonts (such as barcode fonts used in the background by applications) can be eliminated from Font menus by prefixing their FOND names with a percentage sign (%). FONDs within an application can use names prefixed with a space to avoid any confusion in menus over similar FONDs in the Fonts folder.
  267.  
  268. Inside a FOND you‚Äôll see the font size, family ID and a list of family resources used for each font size and style.
  269.  
  270.  
  271. FONT
  272. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  273. ¬†              A description of character shapes for a single font size at 72 dpi. Every FONT must 
  274.                have a parent FOND resource. The pixel editor can be used to design and modify 
  275.                characters ‚Äî to move through ASCII values just drag the character box sideways.
  276.  
  277.  
  278. FONT History                                                                                                         
  279.  
  280. Early Macs used FONTs for printing and for screen display. They‚Äôre still used on the screen but have been replaced by PostScript or TrueType fonts for printing.
  281.  
  282. Each style used a separate FONT. For example, Helvetica used Helvetica, B Helvetica Bold, I Helvetica Italic, and BI Helvetica Bold Italic resources. FONT names used the following prefixes, sometimes in combinations:-
  283.  
  284.                B  Bold        Bk  Book         Blk  Black        C  Condensed
  285.                D  Demi        E   Extended     H    Heavy        I  Italic
  286.                K  Kursive     L   Light        N    Narrow       O  Oblique
  287.                P  Poster      S   Semi         Sl   Slanted      U  Ultra
  288.                X  Extra
  289.  
  290. For Helvetica bold, you could choose B Helvetica Bold from the Font menu or select Bold in the Style menu ‚Äî very messy since every font and style was in the Font menu!
  291.  
  292.  
  293. Updating Old FONT Suitcases                                                                                  
  294.  
  295. The suitcases described above don‚Äôt have any FONDs ‚Äî you don‚Äôt see anything when the suitcase is opened in the Finder! You can add a FOND as follows:-
  296.  
  297.                 1   Copy a FOND from another suitcase containing only one FONT
  298.                 2   Use Get Info for the FOND and enter the family ID
  299.                 3   Note down FONT sizes, styles and IDs
  300.                 4   Remove resource names from the ‚Äònon-0‚Äô FONTs
  301.                 5   Open the FOND and enter the family ID followed by‚Ķ
  302.                        Font Size, Style and Resource ID for each FONT
  303.  
  304.                       √Ö You may not be able to see a FONT‚Äôs character details if 
  305.                      there isn‚Äôt a matching FOND with the correct ID!
  306.  
  307.  
  308. Modern FONT Operation                                                                                         
  309.  
  310. Each set of modern FONTs are linked by a FOND that contains information about the family and its styles (see above). FONTs in suitcases have a family ID of between 0 to 255, of which 0 to 127 are reserved by Apple. Older suitcases include a Size 0 FONT that simply acts as a reference for all fonts in the family. Its ID is given by:-
  311.  
  312.                 Size 0 FONT ID = (Family ID / 128)
  313.  
  314. For all other FONTs in a suitcase:-
  315.  
  316.                 FONT ID = (Family ID / 128) + FONT Size
  317.  
  318. where FONT size is measured in points. A Size 0 FONT often has the same Get Info name as its parent FOND ‚Äî other FONTs or NFNTs shouldn‚Äôt be named to avoid double appearances in Font menus!
  319.  
  320. Any acceptable ID can be used for a FONT within an application or document. 
  321.  
  322.  
  323. System FONTs                                                                                                        
  324.  
  325. Modern systems use Geneva (9 and 12 point) and Monaco (9 point) FONTs in the System file. Chicago, used for menu items and dialogs, is in ROM. The system fonts can be changed by modifying the FONDs in the System file so that they point to another FONT.
  326.  
  327. To replace ROM resources such as Chicago (ID = 12), you must add entries to the ROV# resource ‚Äî this indicates which ROM resources are replaced by equivalents on disk. You must open ROV#, select Insert New Field and enter the type and ID of of the ROM resource to replace. To replace Chicago you must enter FONT and an ID of 12. 
  328.  
  329.  
  330. NFNT
  331. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  332. ¬†              For screen display an NFNT (New Font) works as a FONT ‚Äî separate resources are 
  333.                used for each font size. For printing the resolution is improved by scaling down 
  334.                the largest NFNT. For example, Heidelberg uses a 36 point NFNT to print characters 
  335.                of all sizes ‚Äî hence 36 point printing is at 72 dpi but 12 point is at 216 dpi.
  336.  
  337. An NFNT, unlike the original FONT, only shows one name in the Font menu, whatever styles are available. Font menus are faster with NFNTs since information about the entire family is in a single FOND. Suitcase, Master Juggler and the old Font/DA Mover automatically convert FONTs into NFNTs when you move them into a new suitcase.             
  338.  
  339. If you modify a character using the pixel editor its resolution will be limited to 72 dpi
  340. ‚Äî for serious work on NFNTs you should use a special editor. By adding a fctb resource an NFNT can provide coloured characters. 
  341.  
  342. The family ID of a FOND isn‚Äôt linked to the ID of the NFNT. In a suitcase you can use any family ID from 0 to 32767, although some numbers are reserved by Apple. ID conflicts are automatically resolved by the system ‚Äî or by Font/DA Mover in very old systems!
  343.  
  344.  
  345. sfnt
  346. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww      
  347. ¬†              A scalable font that gives accurate results at any size. It can contain a TrueType, 
  348.                GX or PostScript font. There‚Äôs no way of knowing what‚Äôs actually in the sfnt! 
  349.  
  350.  
  351.  
  352.  
  353. Screen Graphics
  354. qqqqqqqqqqqq
  355.  
  356. In the paired resources below an upper case name indicates a black and white resource and a lower case names indicates a colour version:-
  357.  
  358.  
  359. acur
  360. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  361. A list of CURS resources (see below) for an animated cursor. The System file has eight acurs that are used to create the moving stopwatch, beginning with CURS 4. You mustn‚Äôt select Purgeable in the Get Resource Info window.
  362.  
  363.  
  364.  CURS/crsr
  365. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  366.  ¬†             A 16 x 16 pixel cursor used as a pointer, consisting of a picture, mask and hot spot.
  367.                 The latter is the ‚Äòpointing‚Äô point and appears as a small cross on the picture. You 
  368.                 mustn‚Äôt select Purgeable in the Get Resource Info window.
  369.  
  370.  
  371. PAT_ /ppat
  372. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  373. ¬†               A block of 8 x 8 pixels that are linked to create patterns for scroll bars and other 
  374.                 screen details. The last character in PAT_ is a space.
  375.  
  376.  
  377.  
  378. PAT#/ppt#
  379. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  380. ¬†               A list of patterns, each 8 x 8 pixels, linked together for screen shading. Each 
  381.                 resource contains any number of patterns, often used for line or fill tones in a 
  382.                 drawing application.
  383.  
  384.  
  385.  
  386.  
  387. Screen Icons
  388. qqqqqqqqqq
  389.  
  390. The screen icons used for display in applications or in the Finder are:-
  391.  
  392.  
  393. ICON
  394. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  395. ¬†               Black and white icon of 32 x 32 pixels, often used in HyperCard. In the System 
  396.                 file ICONs 0, 1 and 3 are the warning hand, dialog icon and warning triangle.        
  397.  
  398.  
  399. SICN
  400. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  401. ¬†               A set of small icons of 16 x 16 pixels as used at the left-hand side of text windows.
  402.  
  403.  
  404. You can create your own small icons by removing every other diagonal line in a large icon, but the results aren‚Äôt very pretty ‚Äî those created automatically from ICONs in the Mac itself are even worse! 
  405.  
  406.  
  407. cicn
  408. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  409. ¬†               Colour icon of any size from 8 x 8 to 80 x 80 pixels (usually 32 x 32), including a 
  410.                 black and white version and shadow mask. In the Colour menu you can choose 
  411.                 from standard Apple Icon Colours, Standard 256 Colours and others. 
  412.  
  413.  
  414.  
  415.  
  416. Desktop Icons
  417. qqqqqqqqqqq
  418.  
  419.  
  420. ¬†               Desktop or Finder icons are used for items on the Desktop. When you open the 
  421.                 ICN# editor you‚Äôll see the whole family of icons. You can also get to the editor 
  422.                 from the BNDL editor by clicking on a blank icon and selecting Choose Icon....
  423.  
  424. Different icon types can be copied by dragging them across the editor. For example an ICN# can be copied onto an ics# by dragging the ICN# icon (in the small box on the right) onto the corresponding ics# box. All icons types containing a similar image have a common ID number ‚Äî if there‚Äôs only one image it‚Äôs often 128.
  425.  
  426. The full range of icons are:-
  427.  
  428.  
  429.                 Icon       Pixels        Colours                     
  430.  
  431.                 ics4        16          16      4-bit
  432.                 ics8        16         256        8-bit
  433.                 ic14        32           16        4-bit
  434.                 ic18        32        256      8-bit
  435.                 ICN#         32           2      Black and White
  436.                 ics#             16           2      Black and White
  437.  
  438.  
  439.  
  440. Icon Masks
  441. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  442.  
  443. An icon mask defines the area you click to select an item. If a mask is missing or blank you can‚Äôt select the icon ‚Äî if you try to drag it your machine may crash! The Finder can only produce a photo-negative of a selected item if its mask is the same size as the icon itself. Older systems used magic icons that changed appearance when selected ‚Äî the icon was XOR‚Äôd with a mask containing additional graphic material.
  444.  
  445. To create a mask just drag an icon (in the small box on the right) onto the corresponding mask icon. The ic14 and ic18 icons are masked using extra ICN# resources, whilst ics4 s and ics8 s are masked with an ics#. The last of these is only used for masking.
  446.  
  447.  
  448.  
  449. Hard Disk Icons
  450. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  451.  
  452. Drive icons are often kept as ICN# resources in a formatting application ‚Äî during formatting they‚Äôre installed onto the drive in a different form. The ICN#s in such an application can be modified using ResEdit. Alternatively you can paste an icon onto the disk in its Get Info window ‚Äî but this icon may not appear in ‚Äòdisk switching‚Äô dialogs.
  453.  
  454.  
  455.  
  456. Icon Vault Files
  457. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  458.  
  459. An icon vault file contains a set of icons for files with a particular Creator code. When the Finder rebuilds the Desktop it uses these vault icons in preference to those in the creator application. You can install as many vaults as you like ‚Äî even for files created with applications that aren‚Äôt on your machine!
  460.  
  461. A vault file is of Type ICVT and Creator XXX √Æ where XXXX is the Creator code of the relevant application. Creating a vault isn‚Äôt a trivial task ‚Äî each file should contain:- 
  462.  
  463. ‚Ä¢  BNDL or BNDLs (IDs ‚â• 128) with Signature of XXXX and a list of the application‚Äôs Types
  464. ‚Ä¢  BNDL (ID ‚â• 129) with Signature of XXX √Æ, relating to Type ICVT
  465. ‚Ä¢  FREFs relating to all the application‚Äôs Types and Type ICVT
  466. ‚Ä¢  XXXX named ‚ÄòOwner Resource‚Äô containing 00, as seen in the hex editor
  467. ‚Ä¢  XXX √Æ named ‚ÄòOwner Resource‚Äô containing 00, as seen in the hex editor
  468. ‚Ä¢  A set of icon resources (IDs ‚â• 128) that should appear in the application‚Äôs BNDL window
  469. ‚Ä¢  STR_ (ID = -16397) containing text such as:-
  470.  
  471.                 Icon Vault
  472.  
  473.                 This file adds custom icons to your Macintosh. Place it in the ‚ÄúIcon Vaults‚Äù 
  474.                 folder in your System Folder, and then rebuild the desktop.
  475.  
  476. ‚Ä¢  verss (IDs 1 and 2) containing information for the Get Info window (if required)
  477.  
  478.  
  479. The vaults should be put in a folder named ‚Äò_Icon Vaults‚Äô (note the space at the beginning) in the System Folder ‚Äî the filenames of the folder and enclosed vaults should be locked. Once you‚Äôve installed a vault file you should rebuild the Desktop.
  480.  
  481.  
  482.  
  483.  
  484. Other Resources
  485. qqqqqqqqqqqq
  486.  
  487.  
  488. ALRT
  489. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  490. ¬†              Sets window size, screen position and title of an alert box, the sort that if ignored 
  491.                generates an alert sound. It requires an actb resource for colour. 
  492.  
  493.  
  494. Details about its contents are kept in a matching DITL (see below) whose ID is kept inside the ALRT ‚Äî matching ALRTs and DITLs usually have the same ID. The ALRT can be resized from the bottom right-hand corner or moved by clicking and dragging anywhere within it. Double-click on the dialog to open the matching DITL.
  495.  
  496. If you select Set ALRT Stage Info in the ALRT menu you have the option to choose what to do if the user keeps doing the wrong thing! To get an alert sound without using disk access you should check Preload in the Get Resource Info window.
  497.  
  498. System alert icons are replaced by icons in the current file if they have the same ID.
  499.   
  500.  
  501. BNDL
  502. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  503. ¬†              Ties a document to its application using Type and Creator codes and the ‚Äòset‚Äô
  504.                BNDL flag in the application file. The latter also contains all the icon resources.
  505.  
  506.  
  507. The BNDL window shows the icons and file Types associated with the application. Any Types beginning with s are stationery files. For example:- 
  508.  
  509.                TEXT   n    sEXT
  510.                 PICT   n    sICT
  511.  
  512. Before drawing an icon the Finder checks if the Stationery flag is ‚Äòset‚Äô. If so, it replaces the first letter of the Type by s. The BNDL uses this new Type to pick a correct stationery icon.
  513.  
  514. Inside the BNDL there‚Äôs an item called @ String whose contents come from the signature resource (a resource with the same type as the Creator name). @ String is often empty ‚Äî modern applications get their information from the vers resource! Either @ String or vers data are used for the Get Info window.
  515.  
  516.  
  517. clut
  518. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  519. A colour lookup table for colour routines. The System file includes clut 5 (4 bits for 16 shades) and clut 9 (8 bits for 256 shades).
  520.  
  521.  
  522. CODE
  523. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  524. ¬†              Contains most of the programmer‚Äôs work for an application. CODE 0 points to 
  525.                any further CODEs in a file.
  526.  
  527.  
  528. DITL
  529. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  530.           ¬† Defines the contents of dialogs and alert windows. Its ID should be the same as the 
  531.                matching DLOG or ALRT. Each item can be dragged into position or resized from 
  532.                the bottom right-hand corner. Resizing the window doesn‚Äôt have any effect.
  533.  
  534. The DITL menu has some useful features. Show All Items reveals items that are outside the window, Set Item Number is used when creating a new application, Align to Grid positions items on an adjustable invisible grid and Use Item‚Äôs Rectangle restores a stretched ICON or PICT image to its normal shape.
  535.  
  536. The following items can be found in a DITL window:-
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554. To Fine-tune an item‚Äôs position just double-click on it and adjust the dialog settings ‚Äî these values also appear when you use Open Using Template to open the resource. The dialog also shows the ID of any control, icon or picture resource ‚Äî if such a resource isn‚Äôt in the file a matching System file resource will be used instead. The buttons use standard ID codes of 1 for OK and 2 for Cancel ‚Äî pressing Return or Enter selects OK automatically. 
  555.  
  556.  
  557. DLOG
  558. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  559. ¬†              Sets window size, screen position and title of a dialog box, the sort that appears 
  560.                after you select an item ending in ‚Ķ.. A dctb resource is used for colour. 
  561.  
  562. Details about the box‚Äôs contents are kept in a matching DITL (see above) whose ID is kept in the DLOG ‚Äî matching DLOGs and DITLs often have the same ID. The DLOG can be resized from the bottom right-hand corner or moved by clicking and dragging within it. Double-click on the dialog to open the matching DITL.
  563.  
  564.  
  565. finf
  566. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  567. A font information resource that defines the font, font size and font style used in a program‚Äôs windows. It should use Apple reserved fonts for consistent results on any Mac, irrespective of installed fonts.
  568.  
  569.  
  570. FKEY
  571. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  572. ¬†              A function key or mini-application that‚Äôs launched when ‚Ć and Shift are pressed 
  573.                with a specific number key ‚Äî the number is set by the FKEYs ID.
  574.  
  575. The following standard FKEYs are in the System file:-
  576.  
  577.  
  578.                FKEY No      Function                 
  579.  
  580.                1               Eject diskette 1
  581.                2               Eject diskette 2
  582.                3               Save screen image
  583.  
  584.  
  585. Certain applications such as Suitcase or OtherMenu launch FKEYs directly ‚Äî for these the resource must be on its own in a ResEdit file.
  586.  
  587. An FKEY can be provided by:-
  588.  
  589.              ‚Ä¢ Adding an FKEY resource to the System file using a special utility
  590.              ‚Ä¢ Installing a special suitcase containing an FKEY in the Fonts folder
  591.              ‚Ä¢ Launching a ResEdit version of the FKEY with a utility such as OtherMenu
  592.  
  593. One example, ClipFiler, is supplied as a suitcase containing FKEY, kinf and snd_ resources. ResEdit versions of an FKEY should only contain a single FKEY resource.
  594.  
  595.  
  596. fmnu
  597. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  598. Used in the Finder file and in other software, such as Desktop Printer Extension, for a Finder menu. The shortcut key for each menu item is in the third character before the actual menu name. Here‚Äôs a view inside an fmnu resource from the Finder file:-
  599.  
  600.  
  601.  
  602.  
  603.  
  604.  
  605.  
  606.  
  607.  
  608.  
  609.  
  610.  
  611.  
  612.  
  613.  
  614.  
  615.  
  616.  
  617.  
  618.  
  619. In this example you can see that ‚Ć-N is the shortcut for New Folder. If you want to change this to ‚Ć-F you simply change the N to an F. If there‚Äôs no letter in the space you can add a chosen character ‚Äî but don‚Äôt use one that‚Äôs already used in the menu!
  620.  
  621.  
  622. International Resources
  623. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  624. A group of System file resources used for localisation, also used inside applications to override the local System to give identical results across the world. For local operation the latter should be removed or replaced with copies from the System file. For Roman script, used in most European languages, you need only consider itl0 and itl1.
  625.  
  626.  
  627. itl0                                                                                                                       
  628.  
  629. ¬†              Sets numbers, dates, and time formats, sets the System Region code, indicates 
  630.                use of metric rulers and sets a version number. It‚Äôs also known as INTL with an ID 
  631.                of 0 (INTL 0). Regions include US (0), French (1), British (2) and German (3).
  632.  
  633.  
  634. itl1                                                                                                                       
  635.  
  636. ¬†              Sets names for months and days, using up to 16 bytes for each. Also sets the long 
  637.                date format and the number of letters used for abbreviated months or days. A 
  638.                region code and version number are included. Also known as INTL 1.
  639.  
  640.  
  641. itl2, itl4, itlb, itlc                                                                                                     
  642.  
  643. ¬†              For various international settings, including support for non-Roman scripts in 
  644.                Arabic or Japanese. The itl2 and itl4 resources select language variations whilst 
  645.                itlb sets the script. Languages include English (0), French (1) and German (3).
  646.  
  647.  
  648. itlk                                                                                                                        
  649.  
  650. For non-standard international key assignments on a keyboard.  It normalises the keyboard output to match the basic map in the KMAP resource. 
  651.  
  652.  
  653. KCHR
  654. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  655. ¬†              Used in the System file to convert the keyboard output (as set by KMAP and itlk) 
  656.                into ASCII codes understood by the Mac ‚Äî it supplies software keyboard mapping. 
  657.                A separate KCHR exists for each keyboard layout in the System file.
  658.  
  659. The KCHR editor, shown below, contains several keyboard tables (right) each linked to specific modifier keys. The character chart (left) shows all 255 characters in the font whilst the virtual chart (centre) shows the 128 characters available in the selected table.
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689. Any depressed key(s) are highlighted in the keyboard region (bottom left) at the same time as the corresponding character in the charts. View As‚Ķ lets you see how it works with different keyboards, but only alters the appearance of the keyboard region ‚Äî in reality some keys don‚Äôt work on certain models! 
  690.  
  691. The information region (centre right) shows corresponding character and keyboard codes.
  692.  
  693. To assign a character to a key simply press the key (with any modifier keys) and drag the required character from the character chart to the highlighted character on the virtual chart or keyboard region.
  694.  
  695. The tables are defined as follows:-
  696.  
  697.                Table      Modifiers                         
  698.  
  699.                0           None / ‚Ć / Shift-‚Ć
  700.                1           Shift / Shift-Caps Lock
  701.                2           Caps Lock
  702.                3           Option
  703.                4           Shift-Option
  704.                5           Caps Lock-Option
  705.                6           Option-‚Ć
  706.                7           Control plus any other
  707.  
  708.  
  709. The KCHR menu lets you create a New Table or Duplicate Table for your own choice of modifier keys. Just hold down the modifier keys whilst selecting these items or when transferring new characters onto the keyboard map. With some keyboards Uncouple Modifier Keys lets you give the keys at each end of the keyboard their own table.
  710.  
  711.  
  712. KMAP
  713. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  714. In the System file this indicates keyboard hardware mapping ‚Äî in other words it knows the actual codes produced by each key.
  715.  
  716.  
  717. MACS
  718. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  719. Indicates the Finder or System file version ‚Äî in the latter the text is in STR_  0.
  720.  
  721.  
  722. MENU
  723. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  724. ¬†              Enables and defines a menubar item, including keyboard shortcuts. An mctb is 
  725.                needed for colour. MENU IDs must ascend by one digit as you move across the 
  726.                menubar. MENUs mustn‚Äôt be Purgeable in Get Resource Info.
  727.  
  728. The menubar name can be changed but not deleted ‚Äî and don‚Äôt change the Ô£ø button unless you need to!
  729.  
  730. Dragging menu items around (including dividing lines) can cause confusion since an application identifies them by ID, not by name! Each menu item‚Äôs Text, text Colour and Command Key can be changed. A Text box may contain a space but shouldn‚Äôt be empty.
  731.  
  732. If you use the same command key in two menus the right hand menu is given priority.
  733. The following keys have standard uses:-
  734.  
  735.                File      N  O  S  W  P  Q
  736.                Edit      Z  X  C  A  V
  737.                Style    T  B  U  I
  738.  
  739. P was once used for Plain Text but most applications use T instead.
  740.  
  741. Under the MENU menu you should leave MDEF ID alone! Choose Icon adds an icon at the left of the menu and Remove Icon loses it ‚Äî any associated ICON or SICN must have an ID of between 257 and 511 and you should select Preload in Get Resource Info for fast operation. Remove Colour removes a menu item‚Äôs text colour and Use Colour Picker lets you choose the colour from a standard colour wheel instead of the machine‚Äôs own colours.
  742.  
  743.  
  744. mstr
  745. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  746. Contains file strings such as File or Quit in the System file that allow any application to open files or quit other applications ‚Äî  Quit is used for Shut Down in the Finder.
  747.  
  748.  
  749. PICT
  750. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  751. ¬†              An image that must be copied into a drawing application for editing. Graphics 
  752.                over 2 x 2 inches are scaled down in lists but expand to full size when opened.
  753.  
  754. The window and the position of the PICT within it can be modified by selecting Open Using Template and adjusting the parameter shown.
  755.  
  756.  
  757. pltt
  758. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  759. A palette determining the colours used by an application in a particular environment. Some applications use pltt 0 as the default palette.
  760.  
  761.  
  762. pnot
  763. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  764. Contains information about a file‚Äôs on-screen PICT or TEXT preview shown in an open dialog. Many applications automatically add a pnot when you click on Create in the open dialog. Any TEXT preview is limited to a maximum of 255 characters.  
  765.  
  766. The sixth byte of a pnot contains the ID of the PICT or TEXT preview. For example, in:-
  767.  
  768.                AE2C DCBD 0000 5049 4354 6B42
  769.  
  770. the preview resource has an ID of hex 6B42 (decimal 27458).
  771.  
  772. EPSFs often don‚Äôt have previews ‚Äî you can provide one by adding a pnot  containing:-
  773.  
  774.                AE2C DCBD 0000 5049 4354 0100
  775.  
  776. where hex 0100 (decimal 256) is the ID of an existing PICT preview found inside many EPSFs. To remove a preview the pnot can be deleted.
  777.  
  778.  
  779. PREC
  780. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  781. Contains defaults inside a printer driver file. In an application file, a PREC 4 overrides the PREC 3 settings in the driver ‚Äî other PRECs are used inside PostScript applications.
  782.  
  783. PREC 0/1   Includes defaults for first and last page numbers in Print dialog
  784. PREC 3       Default paper sizes (in 1/120ths of an inch) and paper names
  785. PREC 124   Printer driver name.
  786.  
  787.  
  788. SIZE
  789. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  790. ¬†              Indicates the file‚Äôs Get Info memory needs. SIZE  -1 contains Suggested Size and 
  791.                Minimum Size as set by the programmer. SIZE 0 or SIZE 1 show the Preferred Size.
  792.  
  793. SIZE also includes the following flags:-
  794.  
  795. MultiFinder Aware and Suspend & Resume Events: should both be in the same state.
  796. Background Null Events: indicates application works in the background.
  797. Background Only: indicates application has no user interface.
  798. Get Front Clicks: shows application accepts a mouse event that brings to the foreground. If not set, the application comes to the foreground but doesn‚Äôt receive the event.
  799. 32 Bit Compatible: indicates the programmer thinks it works with 32-bit addressing. 
  800.  
  801.  
  802. snd_
  803. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  804. ¬†              A Format 1 or Format 2 sound ‚Äî the latter must be used for HyperCard. Some 
  805.                older Format 2 snd_s are labelled as format 1! If you select Open Using Hex Editor 
  806.                you‚Äôll see the format in the second data byte. The name snd_ ends in a space.
  807.  
  808. In the snd menu you can hear the sound by selecting Try Sound ‚Äî if an error occurs use Try as HyperCard‚Ñ¢ Sound (if this works it‚Äôs a Format 2 sound). Try Scale With Sound plays the sound over a musical scale.
  809.  
  810. Some snd_s have a header that creates a sequence of notes or continuous loop from the sound. When you double-click on a file containing such a snd_  you‚Äôll hear the sequence or loop ‚Äî but as an alert it‚Äôll only make the basic sound!
  811.  
  812. If you open the System file with ResEdit you can see the installed system sounds.
  813.  
  814.  
  815. styl
  816. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  817. ¬†              Text style information used with a TEXT resource or with text in the data fork.
  818.  
  819.  
  820.  
  821. TEXT
  822. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  823. ¬†              Plain text that can be used in conjunction with a styl to give styled text.
  824.  
  825.  
  826.  
  827. TMPL
  828. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  829. A special template designed for your own work. Use Tab to move through the boxes that you‚Äôve created in a forward direction, Shift-Tab to move backwards. When you open a template ResEdit doesn‚Äôt check to see if the data fits ‚Äî it may crash if the data is too big or simply truncate the data. In some cases it will pad out the data with zeros.
  830.  
  831.  
  832. vers
  833. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  834. ¬†              Provides information for the Finder‚Äôs Get Info window. The vers 1 gives Version 
  835.                data whilst vers 2 provides a single line of text beneath the file name. If vers 1 
  836.                isn‚Äôt present the signature resource is used instead.
  837.  
  838.  
  839. WIND    
  840. wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  841. ¬†              Sets size, screen position and title for a window whose contents isn‚Äôt set by a DITL 
  842.                ‚Äî it‚Äôs just an empty window. A WIND can be resized by dragging at the bottom 
  843.                right-hand corner or moved by clicking and dragging anywhere in the window.
  844.  
  845. The value of ProcID defines the type of window ‚Äî to include a zoom box you simply add 8 to the number! A wctb resource can be used to obtain colour. 
  846.  
  847.  
  848.  
  849. ¬©Ray White. All Rights Reserved 1997